<?php $buttonName = isset($this->buttonName) ? $this->buttonName : 'Delete';?>
<?php $this->headScript()->captureStart();?>
var dButton = {
	box: null,
	mask: null,
	pwdInput: null,
	show: function() {
		this.box = $('#deleteInputBox');
		this.mask = $('.mask');
		this.pwdInput = $('#deleteInputBox input#password');
		this.mask.show();
		this.box.show();
		var h = this.box.height();
		var t = - (h / 2) - 30;
		this.box.css({'width': '400px', 'margin-left': '-200px', 'margin-top': t.toString() + 'px'});
		this.pwdInput.val('').focus().keydown(function(e){
			var key = (e.keyCode) || (e.which) || (e.charCode);
			if(key == 13) {
				$('button#deleteButton').click();
				return false;
			}
		});		
	},
	hide: function() {
		this.box.hide();
		this.mask.hide();
		return false;
	},
	save: function() {
		if(this.pwdInput.val().replace(/[\s]+/i, '') == '') {
			$('#deleteInputEm').html('<?php echo $this->language('Please Enter Your Password');?>');
			this.pwdInput.focus();
			return false;
		}
		$('#deleteInputEm').html('');
		return true;
	}
};
<?php $this->headScript()->captureEnd();?>
<button type="button" onclick="dButton.show();" style="margin-right:0;"><?php echo $this->language($buttonName);?></button>
<div class="fixedbox hidden" id="deleteInputBox">
	<div class="box">
		<div class="hd">
			<h3><strong style="font-weight:normal;"><?php echo $this->language('Hi');?></strong>, <?php echo system_user_instance::getInstance()->getSession()->getIdentity();?></h3>
			<code><a href="#close" onclick="return dButton.hide();" title="<?php echo $this->language('Close');?>">&times;</a></code>
		</div>
		<div class="bd">
			<table class="form no-border">
				<tr>
					<td class="green"><?php echo $this->language('Please Enter Your Password');?>:</td>
				</tr>
				<tr>
					<td>
						<?php echo $this->form()->password('password', '', array('size' => '25', 'maxlength' => '30', 'class' => 'password'));?>
						<code><?php echo $this->language("You must enter your Password, then continue.");?></code>
					</td>
				</tr>
				<tr>
					<td><em class="red" id="deleteInputEm"></em></td>
				</tr>
			</table>
		</div>
		<div class="ft">
			<span>
				<button type="submit" value="1" name="delete" class="save" id="deleteButton" onclick="return dButton.save();"><?php echo $this->language('Submit');?></button>
				<button type="button" name="close" onclick="return dButton.hide();" class="cancel"><?php echo $this->language('Cancel');?></button>
			</span>
		</div>
	</div>
</div>